// 导入store
import {defineStore} from 'pinia'

// 公共属性设置
const useSetting = defineStore('Setting',{
    state:():any=> {
        return {
            // 控制刷新属性
            isRefresh:false,
            // 场景属性
            isScene:false,
            Scenecontrol:document.documentElement,
        }
    },
    actions:{
        // 处理刷新路由属性
        changeRefresh (){ 
            this.isRefresh = !this.$state.isRefresh
        },
        // 处理场景切换
        changeScene () {
            this.isScene = !this.$state.isScene
            this.isScene?this.Scenecontrol.className='dark':this.Scenecontrol.className=''
        },
    },
    getters:{}
})

export default useSetting